package Chapter2.Comparing.c7;

import java.io.FileInputStream;
import java.io.IOException;

public class ExceptionTest3 {
    public static void main(String[] args){
        ExceptionTest3 t = new ExceptionTest3();
        try{
            t.readFile();
        }catch(IOException e){   }
    }
    public void readFile() throws IOException {        FileInputStream in=new FileInputStream("myfile.txt");
        int b;
        b = in.read();
        while(b!= -1)   {
            System.out.print((char)b);
            b = in.read();
        }
        in.close();
    }

}
